#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int fact(int n)
{
	int ret = 1;
	for (int i = 1; i <= n; i++)
	{
		ret *= i;
	}
	return ret;
}

int main()
{
	int n;
	cin >> n;
	cout << fact(n);
	return 0;
}